import axios from "axios";
let res = axios.create({
  baseURL:`http://127.0.0.1:3000/api`
})
res.interceptors.request.use(res=>{
  // @ts-ignore
  res.headers['Authorization'] = 'Bearer '+localStorage.getItem('token')
  return res
})
res.interceptors.response.use(res=>{
  return res.data.data
})
export default res